package project.parser.ast.literals;

import project.environments.DynamicEnv;
import project.environments.StaticEnv;
import project.environments.Value;
import project.parser.ast.types.PrimType;
import project.parser.ast.types.Type;
import project.parser.ast.values.IntValue;

public class IntLiteral extends Literal<Integer> {

	public IntLiteral(Integer value) {
		super(value);
	}

	@Override
	public Type typecheck(StaticEnv senv) {
		return PrimType.NUMBER_TYPE;
	}

	@Override
	public Value evaluate(DynamicEnv denv) {
		return new IntValue(value);
	}

}
